<?php

/**
 * @file
 * Default simple view template to all the fields as a row.
 *
 * - $view: The view in use.
 * - $fields: an array of $field objects. Each one contains:
 *   - $field->content: The output of the field.
 *   - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
 *   - $field->class: The safe class id to use.
 *   - $field->handler: The Views field handler object controlling this field. Do not use
 *     var_export to dump this object, as it can't handle the recursion.
 *   - $field->inline: Whether or not the field should be inline.
 *   - $field->inline_html: either div or span based on the above flag.
 *   - $field->wrapper_prefix: A complete wrapper containing the inline_html to use.
 *   - $field->wrapper_suffix: The closing tag for the wrapper.
 *   - $field->separator: an optional separator that may appear before a field.
 *   - $field->label: The wrap label text to use.
 *   - $field->label_html: The full HTML of the label to use including
 *     configured element type.
 * - $row: The raw result object from the query, with all data it fetched.
 * @ingroup views_templates
 */
$description=$row->field_body[0]['raw']['value'];
if(strlen($description)>50 && $description!=""){
$description = substr( $description, 0, 66 ).'...';
} 
$link = $row->field_field_trailer_link[0]['rendered']['#markup']; 

?>
 <div class="item">         
			<a href="<?php print $link ?>"  target="_blank" ><?php print theme_image_style(array(
						  'style_name' => 'cartelera_cine',
						  'path' => $row->field_field_imagen_cartelera[0]['raw']['uri'],
						  'alt' => $row->node_title,
						  'attributes' => array('class' => 'field_field_imagen_cartelera'),
						  'width'=> 180,
						  'height'=> 264,
					   )); ?>
			<p><?php print $description  ?></p></a>
 </div>
